<?php
declare (strict_types=1);

$appPath = app()->getAppPath();

// 加载所有应用目录下的路由文件
foreach (glob($appPath . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR) as $path) {
    foreach (glob($path . DIRECTORY_SEPARATOR . 'route' . DIRECTORY_SEPARATOR . '*.php') as $file) {
        if (is_file($file)) {
            include $file;
        }
    }
}